<?php
/**
 * 协程文件操作
 * User: ahao
 * Email: 827316006@qq.com
 * Date: 2019/12/3 22:05
 */

Swoole\Runtime::enableCoroutine(true);

go(function () {
    $fp = fopen("test.log", "a+");
    fwrite($fp, str_repeat('A', 20480000));
    fwrite($fp, str_repeat('B', 20480000));
    fclose($fp);
});